add support for ipv6 address in choose_vnc_display function
authorvh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk>
Thu, 15 Sep 2005 12:21:23 +0000 (12:21 +0000)
committervh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk>
Thu, 15 Sep 2005 12:21:23 +0000 (12:21 +0000)
getting the port from the latest field, not the first one.
fix suggested by Nickolai Zeldovich. close bug #231

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
tools/python/xen/xm/create.py

index 482db15b890e452deaf3d6ba9379069e42302ec2..8bc6c3e3d1a13c298f1e3a8f65a500af0e22d499 100644 (file)
@@ -673,7 +673,7 @@ def choose_vnc_display():
             # Local port is field 3.
             y = x.split()[3]
             # Field is addr:port, split off the port.
-            y = y.split(':')[1]
+            y = y.split(':')[-1]
             r.append(int(y))
         return r